package com.itheima.homework.Three;

public class Feeder {

    private Feeder() {
    }

    public static void feed(Animal animal){
        if(animal instanceof Dog){
            Dog dog = (Dog) animal;
            dog.eat();
        }else if(animal instanceof Cat){
            Cat cat = (Cat) animal;
            cat.eat();
        }

    }
}
